import Vue from 'vue'
const vm = new Vue()

const comfirm = () => {
  return vm.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  })
}

const success = () => {
  return vm.$message({
    type: 'success',
    message: '删除成功!'
  })
}

const add = val => {
  return vm.$message({
    type: 'success',
    message: val
  })
}

const error = err => {
  return vm.$message.error(err)
}

export default {
  comfirm,
  success,
  error,
  add
}
